<template>
  <div class="not-found">
    <div class="container">
      <div class="content">
        <div class="error-code">404</div>
        <h1>页面不存在</h1>
        <p>抱歉，您访问的页面不存在或已被删除</p>
        
        <div class="actions">
          <el-button type="primary" @click="goHome">
            返回首页
          </el-button>
          <el-button @click="goBack">
            返回上一页
          </el-button>
        </div>
      </div>
    </div>
  </div>
</template>

<script setup>
import { useRouter } from 'vue-router'

const router = useRouter()

const goHome = () => {
  router.push('/')
}

const goBack = () => {
  history.back()
}
</script>

<style lang="scss" scoped>
.not-found {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  
  .content {
    text-align: center;
    
    .error-code {
      font-size: 120px;
      font-weight: bold;
      line-height: 1;
      margin-bottom: 20px;
      opacity: 0.8;
    }
    
    h1 {
      font-size: 32px;
      margin-bottom: 16px;
    }
    
    p {
      font-size: 16px;
      margin-bottom: 40px;
      opacity: 0.9;
    }
    
    .actions {
      display: flex;
      justify-content: center;
      gap: 16px;
    }
  }
}

@media (max-width: 768px) {
  .not-found {
    .content {
      .error-code {
        font-size: 80px;
      }
      
      h1 {
        font-size: 24px;
      }
      
      .actions {
        flex-direction: column;
        align-items: center;
        
        .el-button {
          width: 200px;
        }
      }
    }
  }
}
</style>